trim the sails to the wind

看风使舵;随机应变